\hypertarget{hspi_8h}{}\section{esp8266/hspi.h File Reference}
\label{hspi_8h}\index{esp8266/hspi.\+h@{esp8266/hspi.\+h}}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{hspi_8h_aadd93900fc87105fa3ef514675d4133b}{S\+PI}~0
\item 
\#define \hyperlink{hspi_8h_a22bd615ece7185b5f635eae8facd0994}{H\+S\+PI}~1
\item 
\#define \hyperlink{hspi_8h_a1eaecab4a7e4f328f38ce57d4d3012d1}{H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE}~64
\item 
\#define \hyperlink{hspi_8h_ad9632609fe3a2c77d6bca3d5252980e3}{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX}~1
\item 
\#define \hyperlink{hspi_8h_a0a89ba717c8b84a7c3799d310b54e5c2}{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX}~2
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{hspi_8h_a75c90f17c5ded9cd0515d597533ac517}{hspi\+\_\+init} (\hyperlink{send_8c_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} prescale, int hwcs)
\begin{DoxyCompactList}\small\item\em H\+S\+PI Initiaization -\/ with automatic chip select Pins\+: M\+I\+SO G\+P\+I\+O12 M\+O\+SI G\+P\+I\+O13 C\+LK G\+P\+I\+O14 CS G\+P\+I\+O15 -\/ optional DC G\+P\+I\+O2. \end{DoxyCompactList}\item 
void \hyperlink{hspi_8h_af1a0f7a7dd3cac5dd6b8489f7ff308dc}{hspi\+\_\+wait\+Ready} (void)
\begin{DoxyCompactList}\small\item\em H\+S\+PI Ready wait. \end{DoxyCompactList}\item 
void \hyperlink{hspi_8h_a95e93b2eb7fb8bd8548f2ad9022aac58}{hspi\+\_\+\+TX} (\hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$data, int count)
\begin{DoxyCompactList}\small\item\em S\+PI buffered write functions. \end{DoxyCompactList}\item 
void \hyperlink{hspi_8h_a1ea1bd90994ac123b4c62bfa511b6972}{hspi\+\_\+\+T\+X\+RX} (\hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$data, int count)
\begin{DoxyCompactList}\small\item\em H\+S\+PI write and read using F\+I\+FO. \end{DoxyCompactList}\item 
void \hyperlink{hspi_8h_a0603c3e5a8c6c29e5deb5609b28e86bc}{hspi\+\_\+\+RX} (\hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$data, int count)
\begin{DoxyCompactList}\small\item\em H\+S\+PI read using F\+I\+FO. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{hspi.\+h@{hspi.\+h}!C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX@{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX}}
\index{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX@{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX}{CONFIG_FOR_RX_TX}}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+R\+X\+\_\+\+TX~2}\hypertarget{hspi_8h_a0a89ba717c8b84a7c3799d310b54e5c2}{}\label{hspi_8h_a0a89ba717c8b84a7c3799d310b54e5c2}


Definition at line 16 of file hspi.\+h.



Referenced by hspi\+\_\+config(), hspi\+\_\+\+R\+X(), and hspi\+\_\+\+T\+X\+R\+X().

\index{hspi.\+h@{hspi.\+h}!C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX@{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX}}
\index{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX@{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX}{CONFIG_FOR_TX}}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+N\+F\+I\+G\+\_\+\+F\+O\+R\+\_\+\+TX~1}\hypertarget{hspi_8h_ad9632609fe3a2c77d6bca3d5252980e3}{}\label{hspi_8h_ad9632609fe3a2c77d6bca3d5252980e3}


Definition at line 15 of file hspi.\+h.



Referenced by hspi\+\_\+config(), and hspi\+\_\+\+T\+X().

\index{hspi.\+h@{hspi.\+h}!H\+S\+PI@{H\+S\+PI}}
\index{H\+S\+PI@{H\+S\+PI}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{H\+S\+PI}{HSPI}}]{\setlength{\rightskip}{0pt plus 5cm}\#define H\+S\+PI~1}\hypertarget{hspi_8h_a22bd615ece7185b5f635eae8facd0994}{}\label{hspi_8h_a22bd615ece7185b5f635eae8facd0994}


Definition at line 12 of file hspi.\+h.



Referenced by hspi\+\_\+config(), hspi\+\_\+init(), hspi\+\_\+read\+F\+I\+F\+O(), hspi\+\_\+set\+Bits(), hspi\+\_\+start\+Send(), hspi\+\_\+wait\+Ready(), and hspi\+\_\+write\+F\+I\+F\+O().

\index{hspi.\+h@{hspi.\+h}!H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE@{H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE}}
\index{H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE@{H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE}{HSPI_FIFO_SIZE}}]{\setlength{\rightskip}{0pt plus 5cm}\#define H\+S\+P\+I\+\_\+\+F\+I\+F\+O\+\_\+\+S\+I\+ZE~64}\hypertarget{hspi_8h_a1eaecab4a7e4f328f38ce57d4d3012d1}{}\label{hspi_8h_a1eaecab4a7e4f328f38ce57d4d3012d1}


Definition at line 13 of file hspi.\+h.



Referenced by hspi\+\_\+read\+F\+I\+F\+O(), hspi\+\_\+\+R\+X(), hspi\+\_\+\+T\+X(), hspi\+\_\+\+T\+X\+R\+X(), and hspi\+\_\+write\+F\+I\+F\+O().

\index{hspi.\+h@{hspi.\+h}!S\+PI@{S\+PI}}
\index{S\+PI@{S\+PI}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{S\+PI}{SPI}}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+PI~0}\hypertarget{hspi_8h_aadd93900fc87105fa3ef514675d4133b}{}\label{hspi_8h_aadd93900fc87105fa3ef514675d4133b}


Definition at line 11 of file hspi.\+h.



\subsection{Function Documentation}
\index{hspi.\+h@{hspi.\+h}!hspi\+\_\+init@{hspi\+\_\+init}}
\index{hspi\+\_\+init@{hspi\+\_\+init}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{hspi\+\_\+init(uint32\+\_\+t prescale, int hwcs)}{hspi_init(uint32_t prescale, int hwcs)}}]{\setlength{\rightskip}{0pt plus 5cm}void hspi\+\_\+init (
\begin{DoxyParamCaption}
\item[{{\bf uint32\+\_\+t}}]{prescale, }
\item[{int}]{hwcs}
\end{DoxyParamCaption}
)}\hypertarget{hspi_8h_a75c90f17c5ded9cd0515d597533ac517}{}\label{hspi_8h_a75c90f17c5ded9cd0515d597533ac517}


H\+S\+PI Initiaization -\/ with automatic chip select Pins\+: M\+I\+SO G\+P\+I\+O12 M\+O\+SI G\+P\+I\+O13 C\+LK G\+P\+I\+O14 CS G\+P\+I\+O15 -\/ optional DC G\+P\+I\+O2. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em prescale} & prescale from C\+PU clock 0 .. 0x1fff \\
\hline
\mbox{\tt in}  & {\em hwcs} & enable G\+P\+I\+O15 hardware chip select \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 55 of file hspi.\+c.



Referenced by setup(), and spi\+\_\+init().

\index{hspi.\+h@{hspi.\+h}!hspi\+\_\+\+RX@{hspi\+\_\+\+RX}}
\index{hspi\+\_\+\+RX@{hspi\+\_\+\+RX}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{hspi\+\_\+\+R\+X(uint8\+\_\+t $\ast$data, int count)}{hspi_RX(uint8_t *data, int count)}}]{\setlength{\rightskip}{0pt plus 5cm}void hspi\+\_\+\+RX (
\begin{DoxyParamCaption}
\item[{{\bf uint8\+\_\+t} $\ast$}]{data, }
\item[{int}]{count}
\end{DoxyParamCaption}
)}\hypertarget{hspi_8h_a0603c3e5a8c6c29e5deb5609b28e86bc}{}\label{hspi_8h_a0603c3e5a8c6c29e5deb5609b28e86bc}


H\+S\+PI read using F\+I\+FO. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$data} & receive buffer \\
\hline
\mbox{\tt in}  & {\em count} & number of bytes to read \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 318 of file hspi.\+c.



Referenced by spi\+\_\+\+R\+X(), and spi\+\_\+\+R\+X\+\_\+buffer().

\index{hspi.\+h@{hspi.\+h}!hspi\+\_\+\+TX@{hspi\+\_\+\+TX}}
\index{hspi\+\_\+\+TX@{hspi\+\_\+\+TX}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{hspi\+\_\+\+T\+X(uint8\+\_\+t $\ast$data, int count)}{hspi_TX(uint8_t *data, int count)}}]{\setlength{\rightskip}{0pt plus 5cm}void hspi\+\_\+\+TX (
\begin{DoxyParamCaption}
\item[{{\bf uint8\+\_\+t} $\ast$}]{data, }
\item[{int}]{count}
\end{DoxyParamCaption}
)}\hypertarget{hspi_8h_a95e93b2eb7fb8bd8548f2ad9022aac58}{}\label{hspi_8h_a95e93b2eb7fb8bd8548f2ad9022aac58}


S\+PI buffered write functions. 

=================================================================H\+S\+PI write using F\+I\+FO 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$data} & transmit buffer \\
\hline
\mbox{\tt in}  & {\em count} & number of bytes to write \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 265 of file hspi.\+c.



Referenced by spi\+\_\+\+T\+X(), and spi\+\_\+\+T\+X\+\_\+buffer().

\index{hspi.\+h@{hspi.\+h}!hspi\+\_\+\+T\+X\+RX@{hspi\+\_\+\+T\+X\+RX}}
\index{hspi\+\_\+\+T\+X\+RX@{hspi\+\_\+\+T\+X\+RX}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{hspi\+\_\+\+T\+X\+R\+X(uint8\+\_\+t $\ast$data, int count)}{hspi_TXRX(uint8_t *data, int count)}}]{\setlength{\rightskip}{0pt plus 5cm}void hspi\+\_\+\+T\+X\+RX (
\begin{DoxyParamCaption}
\item[{{\bf uint8\+\_\+t} $\ast$}]{data, }
\item[{int}]{count}
\end{DoxyParamCaption}
)}\hypertarget{hspi_8h_a1ea1bd90994ac123b4c62bfa511b6972}{}\label{hspi_8h_a1ea1bd90994ac123b4c62bfa511b6972}


H\+S\+PI write and read using F\+I\+FO. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$data} & transmit / receive buffer \\
\hline
\mbox{\tt in}  & {\em count} & number of bytes to write / read \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 292 of file hspi.\+c.



Referenced by spi\+\_\+\+T\+X\+R\+X(), and spi\+\_\+\+T\+X\+R\+X\+\_\+buffer().

\index{hspi.\+h@{hspi.\+h}!hspi\+\_\+wait\+Ready@{hspi\+\_\+wait\+Ready}}
\index{hspi\+\_\+wait\+Ready@{hspi\+\_\+wait\+Ready}!hspi.\+h@{hspi.\+h}}
\subsubsection[{\texorpdfstring{hspi\+\_\+wait\+Ready(void)}{hspi_waitReady(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void hspi\+\_\+wait\+Ready (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{hspi_8h_af1a0f7a7dd3cac5dd6b8489f7ff308dc}{}\label{hspi_8h_af1a0f7a7dd3cac5dd6b8489f7ff308dc}


H\+S\+PI Ready wait. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 159 of file hspi.\+c.



Referenced by esp\+\_\+yield(), hspi\+\_\+config(), hspi\+\_\+init(), hspi\+\_\+\+R\+X(), hspi\+\_\+\+T\+X(), hspi\+\_\+\+T\+X\+R\+X(), loop\+\_\+wrapper(), and spi\+\_\+wait\+Ready().

